#ifndef MENU_LEVEL_SELECT
#define MENU_LEVEL_SELECT

class MenuLevelSelect;

#include <stdlib.h>

#include "GameResources.h"
#include "Level.h"
#include "MenuState.h"

typedef enum {
    mlsNORMAL,
    mlsQUIT
} LevelSelectState;

/*
 * Class to load a level if one has not yet been loaded, otherwise play level
 */
class MenuLevelSelect : public MenuState
{
    public:
		MenuLevelSelect();
	    void enter(void);
	    void exit(void);
        void resume(void);

        bool keyPressed(const OIS::KeyEvent &);
        
        bool clickBackButton(const CEGUI::EventArgs &e);
	    bool hoverBackButton(const CEGUI::EventArgs &e);
	    bool offBackButton(const CEGUI::EventArgs &e);
	    bool clickLeftArrow(const CEGUI::EventArgs &e);
	    bool clickRightArrow(const CEGUI::EventArgs &e);
	    bool clickLevelImage(const CEGUI::EventArgs &e);
	    bool hoverNoise(const CEGUI::EventArgs &e);
	    void setLevelImage();
	    LevelSelectState getState() { return currentState; }
	    void setState(LevelSelectState state) { currentState = state; }
	    
    private:
        LevelVector::iterator levelIterator;
        LevelSelectState currentState;
        
};

#endif
